# CMake toolchain file for building ARM software on Linux environment

# set(CMAKE_SYSTEM_NAME rk1808-Linux)
set(CMAKE_SYSTEM_VERSION 1)

set(PKG_CONFIG_EXECUTABLE "/opt/rk1808/thirdparty/ffmpeg432/bin/aarch64-linux-gnu-pkg-config")
set(CMAKE_SYSTEM_PROCESSOR aarch64)
set(CMAKE_C_COMPILER "/opt/rk1808_toolchain/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc")
set(CMAKE_CXX_COMPILER "/opt/rk1808_toolchain/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-g++")
set(CMAKE_STRIP "/opt/rk1808_toolchain/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-strip")

set(CMAKE_FIND_ROOT_PATH  "/opt/rk1808/thirdparty/ffmpeg432/")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

add_definitions(-DRK_PLATFORM)
# set(OpenCV_DIR "/opt/rk1808/thirdparty/opencv450/lib/cmake/opencv4/")
# set(Boost_DIR "/opt/rk1808/thirdparty/boost1750/lib/cmake/")
# set(Protobuf_DIR "/opt/rk1808/thirdparty/grpc1310/lib/cmake")
# set(FFMPEG_DIR "/opt/rk1808/thirdparty/ffmpeg432")

include_directories("/opt/rk1808/thirdparty/openssl/include")
include_directories("/opt/rk1808/thirdparty/ffmpeg432/include")
include_directories("/opt/rk1808/thirdparty/grpc1310/include")

link_directories("/opt/rk1808/thirdparty/ffmpeg432/lib")
link_directories("/opt/rk1808/thirdparty/grpc1310/lib")
# add_definitions(-fPIC)
# add_definitions(-DARMLINUX)
# add_definitions(-D__gnu_linux__)

set(RK1808_LINUX 1)
